package com.xiaoq.sites.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.xiaoq.MongoEntity;
import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Transient;
import org.springframework.data.elasticsearch.annotations.Document;

import java.io.Serializable;
import java.util.List;

@Entity(value="sites",noClassnameStored=true)
//从ESIndexNameProperties中名为sitesIndexName方法的Bean中取值
@Document(indexName="#{@sitesIndexName}",type="sites",shards=1,replicas=0)
public class SitesEntity extends MongoEntity implements Serializable {

	@JsonIgnore
	@Transient
	private static final long serialVersionUID = -3705006728481127388L;
	private Double centerLongitude;// 中心点经度
	private Double centerLatitude; // 中心点维度
	private Double mainEntryLongitude; // 主入口经度
	private Double mainEntryLatitude;// 主入口纬度
	private String address; // 地址
	private String name; // 名称
	private String shortName; // 简称
	private String logo; // 景区logo路径
	private Integer levels; // 等级
	private String zoneProvince; // 区划省
	private String zoneCity;// 区划市
	private String zoneDistrict;// 换分区
	private String introduction;// 简介
	private String detailInfo; // 详情
	private String openSchedule; // 开放时间
	private String mainImgUrl; // 主图
	private List<String> imgUrls; // 图片列表
	private List<String> tags; // Tag
	private String merchantId; // 商家ID
	private String notice; // 预约需知
	private String enterCert; // 入院凭证
	private String prefPolicy; // 特惠政策;
	private String tips; // 温馨提示
	private String traficTips; // 交通提示
	private String phoneNum;// 电话
	private String announcement;// 公告
	private String avgTime; // 平均游玩时间
	private String bestPeriod; // 最佳游玩月份
	private String status; // 状态 00--草稿，10--收录（可能没上线），20--入住上线
	/** 见ConstantUtil 是否刪除状态*/
	private String delFlag;// 是否刪除状态,
	private Long maxRadius; //最大半径（米）
	private String authenStatus; // 景区的认证状态
	private Long capacity; // 景区承载量
	private String mp3Url;//MP3地址
	private Double lastDistence; // 上一站距离
	private String lastDistenceStrng; // 字符串
	private String foodClass; //菜系类别

	private  int sort;

	public int getSort() {
		return sort;
	}

	public void setSort(int sort) {
		this.sort = sort;
	}

	public String getFoodClass() {
		return foodClass;
	}

	public void setFoodClass(String foodClass) {
		this.foodClass = foodClass;
	}

	public String getMp3Url() {
		return mp3Url;
	}

	public void setMp3Url(String mp3Url) {
		this.mp3Url = mp3Url;
	}

	public String getLastDistenceStrng() {
		return lastDistenceStrng;
	}

	public void setLastDistenceStrng(String lastDistenceStrng) {
		this.lastDistenceStrng = lastDistenceStrng;
	}

	public Double getLastDistence() {
		return lastDistence;
	}

	public void setLastDistence(Double lastDistence) {
		this.lastDistence = lastDistence;
	}

	/**
	 * 冗余字段 存名称 （省市级名称）
	 */
	private String zoneProvinceName; // 区划省
	/**
	 * 冗余字段 存名称 （市级名称）
	 */
	private String zoneCityName;// 区划市
	/**
	 * 冗余字段 存名称 （区县名称）
	 */
	private String zoneDistrictName;// 区
	
	private String miniImgUrl; //小程序主图Url

	/**
	 *  [centerLongitude, centerLatitude]
	 */
	private double[] loc = new double[2];

	public Double getCenterLongitude() {
		return centerLongitude;
	}

	public void setCenterLongitude(Double centerLongitude) {
		this.centerLongitude = centerLongitude;
		if(centerLongitude != null){
			loc[0] = centerLongitude;
		}
	}

	public Double getCenterLatitude() {
		return centerLatitude;
	}

	public void setCenterLatitude(Double centerLatitude) {
		this.centerLatitude = centerLatitude;
		if(centerLatitude != null){
			loc[1] = centerLatitude;
		}
	}

	public Double getMainEntryLongitude() {
		return mainEntryLongitude;
	}

	public void setMainEntryLongitude(Double mainEntryLongitude) {
		this.mainEntryLongitude = mainEntryLongitude;
	}

	public Double getMainEntryLatitude() {
		return mainEntryLatitude;
	}

	public void setMainEntryLatitude(Double mainEntryLatitude) {
		this.mainEntryLatitude = mainEntryLatitude;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getShortName() {
		return shortName;
	}

	public void setShortName(String shortName) {
		this.shortName = shortName;
	}

	public String getLogo() {
		return logo;
	}

	public void setLogo(String logo) {
		this.logo = logo;
	}

	public Integer getLevels() {
		return levels;
	}

	public void setLevels(Integer levels) {
		this.levels = levels;
	}

	public String getZoneProvince() {
		return zoneProvince;
	}

	public void setZoneProvince(String zoneProvince) {
		this.zoneProvince = zoneProvince;
	}

	public String getZoneCity() {
		return zoneCity;
	}

	public void setZoneCity(String zoneCity) {
		this.zoneCity = zoneCity;
	}

	public String getZoneDistrict() {
		return zoneDistrict;
	}

	public void setZoneDistrict(String zoneDistrict) {
		this.zoneDistrict = zoneDistrict;
	}

	public String getIntroduction() {
		return introduction;
	}

	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}

	public String getDetailInfo() {
		return detailInfo;
	}

	public void setDetailInfo(String detailInfo) {
		this.detailInfo = detailInfo;
	}

	public String getOpenSchedule() {
		return openSchedule;
	}

	public void setOpenSchedule(String openSchedule) {
		this.openSchedule = openSchedule;
	}

	public String getMainImgUrl() {
		return mainImgUrl;
	}

	public void setMainImgUrl(String mainImgUrl) {
		this.mainImgUrl = mainImgUrl;
	}

	public List<String> getImgUrls() {
		return imgUrls;
	}

	public void setImgUrls(List<String> imgUrls) {
		this.imgUrls = imgUrls;
	}

	public List<String> getTags() {
		return tags;
	}

	public void setTags(List<String> tags) {
		this.tags = tags;
	}

	public String getMerchantId() {
		return merchantId;
	}

	public void setMerchantId(String merchantId) {
		this.merchantId = merchantId;
	}

	public String getNotice() {
		return notice;
	}

	public void setNotice(String notice) {
		this.notice = notice;
	}

	public String getEnterCert() {
		return enterCert;
	}

	public void setEnterCert(String enterCert) {
		this.enterCert = enterCert;
	}

	public String getPrefPolicy() {
		return prefPolicy;
	}

	public void setPrefPolicy(String prefPolicy) {
		this.prefPolicy = prefPolicy;
	}

	public String getTips() {
		return tips;
	}

	public void setTips(String tips) {
		this.tips = tips;
	}

	public String getTraficTips() {
		return traficTips;
	}

	public void setTraficTips(String traficTips) {
		this.traficTips = traficTips;
	}

	public String getPhoneNum() {
		return phoneNum;
	}

	public void setPhoneNum(String phoneNum) {
		this.phoneNum = phoneNum;
	}

	public String getAnnouncement() {
		return announcement;
	}

	public void setAnnouncement(String announcement) {
		this.announcement = announcement;
	}

	public String getAvgTime() {
		return avgTime;
	}

	public void setAvgTime(String avgTime) {
		this.avgTime = avgTime;
	}

	public String getBestPeriod() {
		return bestPeriod;
	}

	public void setBestPeriod(String bestPeriod) {
		this.bestPeriod = bestPeriod;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getDelFlag() {
		return delFlag;
	}

	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}

	public Long getMaxRadius() {
		return maxRadius;
	}

	public void setMaxRadius(Long maxRadius) {
		this.maxRadius = maxRadius;
	}

	public String getAuthenStatus() {
		return authenStatus;
	}

	public void setAuthenStatus(String authenStatus) {
		this.authenStatus = authenStatus;
	}

	public Long getCapacity() {
		return capacity;
	}

	public void setCapacity(Long capacity) {
		this.capacity = capacity;
	}

	public String getZoneProvinceName() {
		return zoneProvinceName;
	}

	public void setZoneProvinceName(String zoneProvinceName) {
		this.zoneProvinceName = zoneProvinceName;
	}

	public String getZoneCityName() {
		return zoneCityName;
	}

	public void setZoneCityName(String zoneCityName) {
		this.zoneCityName = zoneCityName;
	}

	public String getZoneDistrictName() {
		return zoneDistrictName;
	}

	public void setZoneDistrictName(String zoneDistrictName) {
		this.zoneDistrictName = zoneDistrictName;
	}

	public String getMiniImgUrl() {
		return miniImgUrl;
	}

	public void setMiniImgUrl(String miniImgUrl) {
		this.miniImgUrl = miniImgUrl;
	}

	public double[] getLoc() {
		return loc;
	}
}
